

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Structured Activity [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Element,Element Sub-Activity,Element Structured Activity,Sub-Activity,Sub-Activity Element,Structured Activity,Structured Activity Element,Structured Activity Nested,Structured Activity Node,Structured Activity Loop Node,Structured Activity Simple Composite,Structured Activity Conditional Node,Structured Activity Sequential Node,New Structured Activity Dialog,Activity,Activity Structured">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Structured Activity</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="stateinvariant.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="submachine.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">You can add a </span><span class="f_BodyText" style="font-style: italic;">Structured Activity</span><span class="f_BodyText"> element to an <a href="activitydiagram.htm">Activity diagram</a>. A S</span><span class="f_BodyText">tructured</span><span class="f_BodyText"> Activity element is a composite of an element, a connector and a child Activity diagram, which is represented by the</span><span class="f_BodyText"> small symbol in the bottom right-hand corner of the element.</span></p>
<p class="p_BodyText"><span class="f_BodyText">There are five types of Structured Activity, each representing a particular structure of activity events. The five types are represented below:</span></p>
<p class="p_TextIndentedL2"><img src="subactivities.png" width="138" height="86" border="0" alt="SubActivities"><span class="f_TextIndentedL2"> &nbsp;&nbsp;&nbsp;&nbsp; <img src="structact.png" width="146" height="85" border="0" alt="StructAct"> &nbsp;&nbsp;&nbsp;&nbsp; <img src="condstructact.png" width="142" height="85" border="0" alt="CondStructAct"> &nbsp;&nbsp;&nbsp;&nbsp; <img src="sequentialstructact.png" width="149" height="88" border="0" alt="SequentialStructAct"> &nbsp;&nbsp;&nbsp;&nbsp; <img src="loopstructact.png" width="145" height="92" border="0" alt="LoopStructAct"></span></p>
<ul style="text-indent: 0px; margin-left: 30px; list-style-position: outside;">
<li><span class="f_Bulletlist1" style="font-style: italic;">Simple Composite</span><span class="f_Bulletlist1"> - represents an arrangement of activities that take place independent of each other</span></li>
<li><span class="f_Bulletlist1" style="font-style: italic;">Structured</span><span class="f_Bulletlist1"> </span><span class="f_Bulletlist1" style="font-style: italic;">Activity node</span><span class="f_Bulletlist1"> - represents an ordered arrangement of activities; that is, activities that have relationships</span></li>
<li><span class="f_Bulletlist1" style="font-style: italic;">Conditional node</span><span class="f_Bulletlist1"> - represents an arrangement of activities where choice determines which activities are performed</span></li>
<li><span class="f_Bulletlist1" style="font-style: italic;">Sequential node</span><span class="f_Bulletlist1"> - represents a sequential arrangement of activities</span></li>
<li><span class="f_Bulletlist1" style="font-style: italic;">Loop node</span><span class="f_Bulletlist1"> - represents a sequence of activities that are - or can be - repeated on the same object.</span></li>
</ul>
<p class="p_BodyText"><span class="f_BodyText">To create a S</span><span class="f_BodyText">tructured</span><span class="f_BodyText"> Activity</span><span class="f_BodyText">, drag the </span><span class="f_BodyText" style="font-style: italic;">Structured Activity</span><span class="f_BodyText"> element from the </span><span class="f_UIControl">Activity Elements</span><span class="f_BodyText"> page in the Enterprise Architect UML </span><span class="f_UIControl">Toolbox</span><span class="f_BodyText"> onto the diagram. The </span><span class="f_UIControl">New Structured Activity</span><span class="f_BodyText"> dialog displays, on which you specify which type of Structured Activity to create.</span></p>
<p class="p_TextIndentedL2"><img src="newstructuredactivitydialog.png" width="303" height="222" border="0" alt="NewStructuredActivityDialog"></p>
<p class="p_BodyText"><span class="f_BodyText">To display the Activity diagram represented by the S</span><span class="f_BodyText">tructured</span><span class="f_BodyText"> Activity</span><span class="f_BodyText"> element, double-click on the element.</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Nested Structured Activities</span></p>
<p class="p_BodyText"><span class="f_BodyText">Structured Activity elements can point to child diagrams that themselves contain or consist of Structured Activity elements; that is, the Structured Activity elements are nested. When you create nested S</span><span class="f_BodyText">tructured</span><span class="f_BodyText"> Activity elements, they are shown as nested in the </span><span class="f_UIControl">Project Browser</span><span class="f_BodyText">; see the example below.</span></p>
<p class="p_TextIndentedL2"><img src="subactivitiestree.png" width="152" height="124" border="0" alt="SubActivitiesTree"></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Toolbox Icon</span></p>
<p class="p_TextIndentedL2"><img src="e_subactivity.png" width="170" height="25" border="0" alt="e_SubActivity"></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">OMG UML Specification</span></p>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Structured Activity Node</span></p>
<p class="p_BodyText"><span class="f_BodyText">The OMG UML specification (</span><span class="f_BodyText" style="font-style: italic;">UML Superstructure Specification, v2.1.1, p. 409)</span><span class="f_BodyText"> states:</span></p>
<p class="p_OMGText"><span class="f_OMGText">A structured activity node is an executable activity node that may have an expansion into subordinate nodes as an ActivityGroup. The subordinate nodes must belong to only one structured activity node, although they may be nested.</span></p>
<p class="p_OMGText"><span class="f_OMGText">A structured activity node represents a structured portion of the activity that is not shared with any other structured node, except for nesting.</span></p>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Loop Node</span></p>
<p class="p_BodyText"><span class="f_BodyText">The OMG UML specification (</span><span class="f_BodyText" style="font-style: italic;">UML Superstructure Specification, v2.1.1, pp. 384-385</span><span class="f_BodyText">) states:</span></p>
<p class="p_OMGText"><span class="f_OMGText">A loop node is a structured activity node that represents a loop with setup, test, and body sections.</span></p>
<p class="p_OMGText"><span class="f_OMGText">Each section is a well-nested subregion of the activity whose nodes follow any predecessors of the loop and precede any successors of the loop. The test section may precede or follow the body section. The setup section is executed once on entry to the loop, and the test and body sections are executed repeatedly until the test produces a false value. The results of the final execution of the test or body are available after completion of execution of the loop.</span></p>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Sequential Node</span></p>
<p class="p_BodyText"><span class="f_BodyText">The OMG UML specification (</span><span class="f_BodyText" style="font-style: italic;">UML Superstructure Specification, v2.1.1, p. 408</span><span class="f_BodyText">) states:</span></p>
<p class="p_OMGText"><span class="f_OMGText">A sequence node is a structured activity node that executes its actions in order.</span></p>
<p class="p_SubHeadingL2"><span class="f_SubHeadingL2">Conditional Node</span></p>
<p class="p_BodyText"><span class="f_BodyText">The OMG UML specification (</span><span class="f_BodyText" style="font-style: italic;">UML Superstructure Specification, v2.1.1, p.355</span><span class="f_BodyText">) states:</span></p>
<p class="p_OMGText"><span class="f_OMGText">A conditional node is a structured activity node that represents an exclusive choice among some number of alternatives.</span></p>
<p class="p_OMGText"><span class="f_OMGText">A conditional node consists of one or more clauses. Each clause consists of a test section and a body section. When the conditional node begins execution, the test sections of the clauses are executed. If one or more test sections yield a true value, one of the corresponding body sections will be executed. If more than one test section yields a true value, only one body section will be executed. The choice is nondeterministic unless the test sequence of clauses is specified. If no test section yields a true value, then no body section is executed; this may be a semantic error if output values are expected from the conditional node.</span></p>




            </div>
          </div>
        </div>



</div>


</body>
</html>
